<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<img src="img/boy.jpg" width="500px" id="image"/>
		<canvas id="can" width="500px" height="500px" style="border: dashed 1px;"></canvas>
		<script>
			var can = document.getElementById("can");
			g = can.getContext("2d");
			
			var image = document.getElementById("image");
			image.onload = function(){
				g.drawImage(image,300,100,100,100,50,50,300,300);
			}			
		</script>
	</body>
</html>
